package com.jungle.mvvm.sample.ui.collect;


import com.jungle.mvvm.sample.api.CollectApi;
import com.jungle.mvvm.sample.bean.CollectBean;
import com.jungle.mvvm.sample.bean.ListBean;
import com.jungle.mvvm.sample.bean.SameBean;
import com.jungle.mvvm.sample.http.WanNetwork;

import java.util.List;

import io.reactivex.Observable;

/**
 * @ClassName CollectModel
 * @Description CollectModel
 * @Author Daniel
 * @Version V1.0.0
 */
public class CollectModel {
    public static Observable<SameBean> collect(int id) {
        return WanNetwork.getService(CollectApi.class)
                .collect(id);
    }

    public static Observable<SameBean> uncollect(int id) {
        return WanNetwork.getService(CollectApi.class)
                .uncollect(id);
    }

    public static Observable<SameBean> uncollect(int id, int originId) {
        return WanNetwork.getService(CollectApi.class)
                .uncollect(id, originId);
    }

    public static Observable<ListBean<List<CollectBean>>> getCollectionList(int size) {
        return WanNetwork.getService(CollectApi.class)
                .getCollectionList(size);
    }
}
